#ifndef ROLLERSUBSYSTEM_HPP
#define ROLLERSUBSYSTEM_HPP

#include "WPILib.h"
#include "RobotSubsystem.h"
#include "OperatorButton.h"

class RollerSubsystem : public RobotSubsystem
{
public:
	enum ArmPosition
	{
		kBack,
		kDeployed
	};
	
	RollerSubsystem();
	virtual ~RollerSubsystem();
	
	virtual void DoRobotInit(void);
	virtual void DoAutonomousInit(void);
	virtual void DoTeleopInit(void);
	virtual void DoDisabledInit(void);
	virtual void DoAutonomousPeriodic(void);
	virtual void DoTeleopPeriodic(void);
	virtual void DoDisabledPeriodic(void);
	
	void SetPosition(ArmPosition armPosition);
	void ArmMotorControl();
	bool GetIsArmBack();
	bool GetIsArmDeployed();
	void DropProp();
private:
	Talon *m_armMotor;
	OperatorButton *m_pickupOverride;
	OperatorButton *m_prongsUpButton;
	OperatorButton *m_prongsDownButton;
	OperatorButton *m_armDeployedSwitch;
	OperatorButton *m_armBackSwitch;
	DigitalInput *m_backLimitSwitch;
	DigitalInput *m_deployedLimitSwitch;
	Timer *m_propTimer;
	ArmPosition m_requestedArmPosition;
	ArmPosition m_currentArmPosition;
	void ManualArm();
	
	Talon *m_roller;
	OperatorButton *m_rollerForwardSwitch;
	OperatorButton *m_rollerReverseSwitch;
	
};

#endif
